﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;

namespace BCDto.Website.UserAddress
{
    /// <summary>
    /// 用户地址
    /// </summary>
    public class UserAddressRequestDto
    {
        /// <summary>
        /// 省/州Id
        /// </summary>		
        [Display(Name = "省/州Id")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public long ProvinceId { get; set; }
        /// <summary>
        /// 市Id
        /// </summary>	
        [Display(Name = "市Id")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public long CityId { get; set; }
        /// <summary>
        /// 区县Id
        /// </summary>		
        [Display(Name = "区县Id")]
        public long? CountyId { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>		
        [Display(Name = "收货人")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(20, MinimumLength = 1, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string Consignee { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>		
        [Display(Name = "收货人电话")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(20, MinimumLength = 8, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string ConsigneePhone { get; set; }
        /// <summary>
        /// 地址
        /// </summary>		
        [Display(Name = "地址")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(100, MinimumLength = 6, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string Address { get; set; }
        /// <summary>
        /// 已默认
        /// </summary>		
        [Display(Name = "已默认")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public bool IsDefault { get; set; }
    }
}

